class fragments::android(
      String $android_sdk_dir,
      String $android_studio_dir,
      $mainuser = lookup('mainuser')
) {
  file { '/etc/profile.d/android.sh':
       ensure => present,
       owner => 'root',
       content => template('fragments/android.sh.erb')
  }

  file { "/home/${mainuser}/.local/share/applications":
       ensure => directory,
       owner => "${mainuser}"
  }
  file { "/home/${mainuser}/.local/share/applications/android-studio.desktop":
       ensure => present,
       owner => "${mainuser}",
       content => template("fragments/android-studio.desktop.erb"),
       require => File["/home/${mainuser}/.local/share/applications"]
  }
}